package com.oazon.moco.link.core;

import java.io.File;
import java.util.List;

import com.oazon.moco.bean.McServiceMsg;
import com.oazon.moco.lan.core.controldriver.bean.ControlDriver;
import com.oazon.moco.lan.core.http.bean.AVTransportUri;
import com.oazon.moco.lan.core.http.bean.AllSatus;
import com.oazon.moco.lan.core.http.bean.AllStateInstance;
import com.oazon.moco.lan.core.http.bean.ControlVolume;
import com.oazon.moco.lan.core.http.bean.DeleteBean;
import com.oazon.moco.lan.core.http.bean.FavoriteBean;
import com.oazon.moco.lan.core.http.bean.MediaStateInstance;
import com.oazon.moco.lan.core.http.bean.PositionInfo;
import com.oazon.moco.lan.core.http.bean.ResponseUriToQueue;
import com.oazon.moco.lan.core.http.bean.ResponseVolume;
import com.oazon.moco.lan.core.http.bean.Seek;
import com.oazon.moco.lan.core.http.bean.SongInfo;
import com.oazon.moco.lan.core.http.bean.UriToQueue;
import com.oazon.moco.lan.core.http.bean.VolumeInstance;
import com.oazon.moco.lan.core.http.bean.ZoneInfo;
import com.oazon.moco.link.core.source.LanEventSource;
import com.oazon.moco.link.core.source.LinkEventSource;
import com.oazon.moco.link.event.ResponceStatus;
import com.oazon.voicelib.model.SemanticObj;

/**
 * 所有的业务功能
 * @author chengke
 *
 */
public interface ILinkEventService {

//PlayerEvent 
	public void addUriToQueue(LinkEventSource source, UriToQueue uriToQueue);//推送事件
	public void volumeUp(LinkEventSource source);//音量加
	public void volumeDown(LinkEventSource source);//音量减
	public void play(LinkEventSource source,int instanceID, int speed);//播放开始
	public void stop(LinkEventSource source,int instanceID);//播放停止
	public void pause(LinkEventSource source,int instanceID);//暂停播放
    public void previous(LinkEventSource source,int instanceID);//上一首
    public void next(LinkEventSource source,int instanceID);//下一首
	public void setVolume(LinkEventSource source, VolumeInstance volumeInstance);//调节音量
	public void setAVTransportUri(LinkEventSource source,AVTransportUri avTransportUri);
	public void addUriToQueueResponse(LinkEventSource source,ResponseUriToQueue responseUriToQueue);
//	public void sendVolume(LinkEventSource source, VolumeInstance instance);//向控制设备发送音量
	
	public void setPlayMode(LinkEventSource source,String playMode);//设置播放模式（单曲播放，循环播放）
	public void favorite(LinkEventSource source,FavoriteBean favoriteOrder);//改变对歌曲的喜欢
	public void delete(LinkEventSource source,DeleteBean deleteOrder);//删除这首歌曲
	public void setProgress(LinkEventSource source,Seek seek);//调节播放进度
	public void notyfiStateChange(LinkEventSource source,MediaStateInstance instances);//切歌的时候调用
	public void shift(LinkEventSource source);//播放切换事件,b是否在播放
    
    
//ResponceEvent
    public void responseHardWareVersion(LinkEventSource source,String s);//硬件版本
    public void responseVersion(LinkEventSource source,ZoneInfo zoneInfo);//响应软件版本
    public void responsePlayStatus(LinkEventSource source,String playStatus);//响应播放状态
    public void responsePositionInfo(LinkEventSource source,PositionInfo positionInfo);//响应播放进度
    public void responseVolume(LinkEventSource source,ResponseVolume volume);//响应音量
    public void responseSongInfo(LinkEventSource source,SongInfo songInfo);//响应当前歌曲信息
    public void responseCategory(LinkEventSource source,String category);//响应当前所在的目录
    public void responsePlayMode(LinkEventSource source,String playMode);//响应当前播放模式
    public void responseAllStatus(LinkEventSource source,MediaStateInstance instances);//响应当前的所有状态
    public void responseSystemStatus(LinkEventSource source,ResponceStatus responceStatus);//响应pc状态
    
//SpeechEvent    
    public void speechStart(LinkEventSource source);//语音开始
    public void speechStop(LinkEventSource source);//语音结束
    public void speechVolume(LinkEventSource source,int volume);//语音的音量大小
    public void speechUnderstandRs(LinkEventSource source,String string);//语音的字符串返回结果
	public void speechUnderstandRs(LinkEventSource source,SemanticObj result);//语音的结果的对象
	public void speechEnd(LinkEventSource source);//用户说完了
	public void speechUnderstandError(LinkEventSource source,String error);//无法被理解的
	public void speechSpeakComplite(LinkEventSource source,boolean isWake);//语音合成结束
	public void speechStartSpeakString(LinkEventSource source,String speakStr);//开始语音合成，读出speakStr的字
	public void speechStopSpeak(LinkEventSource source);//开始停止语音合成

//EQEvent   
	public void chooseEQ(LinkEventSource source,byte b);//选择EQ
	public void sendEQFile(LinkEventSource source,int[] eq_h,int[] eq_l);//发送EQ
 
	
//RequestEvent
	public void requestVolume(LinkEventSource source,int instanceID);//MCU查询音量大小      LAN查询音量
	public void requestState(LinkEventSource source);//MCU查询上位机工作状态
	public void requestHardWareVersion(LinkEventSource source);//获取硬件版本号
	public void requestChage(LinkEventSource source);//请求得到电量状态 setChageOn和setChargeOff做响应
	public void requestFull(LinkEventSource source);//请求得到电量满 setFullYes和setFullNo做响应
	public void requestChagePercent(LinkEventSource source);
	public void requestExternalBatteryin(LinkEventSource source);
	
	public void requestPlayStatus(LinkEventSource source);
	public void requestVersion(LinkEventSource source,ZoneInfo zoneInfo);
	public void requestProgress(LinkEventSource source,int instanceID);
	public void requestSongInfo(LinkEventSource source);
	public void requestCategory(LinkEventSource source);
	public void requestPlayMode(LinkEventSource source);
	public void requestAllStatus(LinkEventSource source,int instanceID);
	
//SystemStateEvent
	public void setShutdoneOpentime(LinkEventSource source,int time);
	public void isShutdone(LinkEventSource source);//关机
	public void isShutdoneOpenCancel(LinkEventSource source);//关机之后等n秒重起关闭
	public void isWait(LinkEventSource source);//待机
	public void isNormal(LinkEventSource source);//正常
	public void isOpendone(LinkEventSource source);//开机完成
	public void isScreenProtect(LinkEventSource source);//进入屏保
	public void hasAction(LinkEventSource source);

	
//BatteryEvent	
	public void setChageOn(LinkEventSource source);
	public void setChageOff(LinkEventSource source);
	public void setFullYes(LinkEventSource source);//电池充满
	public void setFullNo(LinkEventSource source);//电池未满
	public void setExternalPowerIn(LinkEventSource source);//外置电源接入
	public void setExternalPowerOut(LinkEventSource source);//外置电源未接入
	public void setChagePercent(LinkEventSource source,int percent);//外置电源未接入
	public void setLow(LinkEventSource source);//低电量提醒
	
//LanEvent
	public void subscribe(LinkEventSource source,ControlDriver controlDriver);//控制设备订阅
	public void unsubscribe(LinkEventSource source,ControlDriver controlDriver);//控制设备取消订阅
	public void openService(LinkEventSource source,int port);//打开服务
	public void openServiceCallback(LinkEventSource source,boolean isOpenServiceCallback);//是否打开服务成功
	public void closeService(LinkEventSource source);//关闭服务
	public void closeServiceCallback(LinkEventSource source,boolean isCloseServiceCallback);//是否关闭服务成功
	public void wifiConnected(LinkEventSource source,boolean wifiConnected,String wifiName);
	public void notifyMCServices(LinkEventSource source,List<McServiceMsg> mcServiceMsgs,String uuid);

	//update event
	public void updateStart(LinkEventSource source);
	public void updateEnd(LinkEventSource source);

	//service added
	public void serviceAdded(LinkEventSource source, McServiceMsg msg);
	public void serviceDelete(LinkEventSource lanSource, String name);
	//电压
	public void setVoltage(LinkEventSource serialSource, float a);
}

